﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms; 
using Microsoft.Reporting.WinForms;
using CourseArraging.Common;
using Stone.DataContracts;

namespace CourseArraging.Frm.bbxx
{
    public partial class FrmXybb : Form
    {
        /// <summary>
        /// 版权所有
        /// 石世特@温州医学院 sst330381@gmail.com
        /// </summary> 
        public FrmXybb()
        {
            InitializeComponent();
        }
        public FrmXybb(XybbEntity xybbEntity)
            : this()
        {
            reportViewer1.LocalReport.ReportPath = GlobalVar.filePath + @"\bb\BbXyqd.rdlc";

            ReportParameter xybh = new ReportParameter("xybh",xybbEntity.XyId);
            ReportParameter sksj = new ReportParameter("sksj",xybbEntity.Sksj);
            ReportParameter skdd = new ReportParameter("skdd",xybbEntity.Skdd);
            ReportParameter mzcs = new ReportParameter("mzcs", xybbEntity.Mzcs);
            ReportParameter mcks = new ReportParameter("mcks", xybbEntity.Mcks);
            ReportParameter ksfz = new ReportParameter("ksfz", xybbEntity.Ksfz);
            ReportParameter ksrq = new ReportParameter("ksrq", xybbEntity.Ksrq);
            ReportParameter jsrq = new ReportParameter("jsrq", xybbEntity.Jsrq);
            ReportParameter kcmc = new ReportParameter("kcmc", xybbEntity.Kcmc);
            ReportParameter fkfs = new ReportParameter("fkfs", xybbEntity.Fkfs);
            ReportParameter jemks = new ReportParameter("jemks", xybbEntity.Jemks);

            this.reportViewer1.LocalReport.SetParameters(
                new ReportParameter[] { xybh, sksj, skdd, mzcs, mcks, ksfz, ksrq, jsrq, kcmc, fkfs, jemks });
        }

        private void FrmXybb_Load(object sender, EventArgs e)
        {

            this.reportViewer1.RefreshReport();
        }
    }
}
